package com.pasabahceambalaj.session;

import com.pasabahceambalaj.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("sevkList")
public class SevkList extends EntityQuery<Sevk> {

	private static final String EJBQL = "select sevk from Sevk sevk";

	private static final String[] RESTRICTIONS = { "lower(sevk.ehliyetno) like lower(concat(#{sevkList.sevk.ehliyetno},'%'))", "lower(sevk.irsaliyeno) like lower(concat(#{sevkList.sevk.irsaliyeno},'%'))", "lower(sevk.plaka) like lower(concat(#{sevkList.sevk.plaka},'%'))", "lower(sevk.ruhsatno) like lower(concat(#{sevkList.sevk.ruhsatno},'%'))", "lower(sevk.seri) like lower(concat(#{sevkList.sevk.seri},'%'))", "lower(sevk.sira) like lower(concat(#{sevkList.sevk.sira},'%'))", "lower(sevk.teslimalanadsoyad) like lower(concat(#{sevkList.sevk.teslimalanadsoyad},'%'))", "lower(sevk.teslimedenadsoyad) like lower(concat(#{sevkList.sevk.teslimedenadsoyad},'%'))", };

	private Sevk sevk = new Sevk();

	public SevkList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Sevk getSevk() {
		return sevk;
	}
}
